import request from '@/utils/request'

const api_name = `/platformapi/user/patient`

export default {

  findList() {
    return request({
      url: `${api_name}/auth/findAll`,  //查询所有
      method: `post`
    })
  },

  getById(id) {
    return request({
      url: `${api_name}/auth/get/${id}`,  //根据id查找
      method: 'post'
    })
  },

  save(patient) {
    return request({
      url: `${api_name}/auth/save`,   //添加
      method: 'post',
      data: patient
    })
  },

  updateById(patient) {
    return request({
      url: `${api_name}/auth/update`,   //修改
      method: 'post',
      data: patient
    })
  },
  /*
  *
  name: '',
  certificatesType: '',
  certificatesNo: '',
  sex: 1,
  birthdate: '',
  phone: '',
  isMarry: 0,
  isInsure: 0,
  provinceCode: '',
  cityCode: '',
  districtCode: '',
  addressSelected: null,
  address: '',
  contactsName: '',
  contactsCertificatesType: '',
  contactsCertificatesNo: '',
  contactsPhone: '',
  param: {}
  * */

  removeById(id) {
    return request({
      url: `${api_name}/auth/remove/${id}`, //根据id删除
      method: 'post'
    })
  }
}
